# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: demo02.py
@time: 2021/05/17
"""

def test01():
    ...
    content = 'a12b2b1'
    print(content.replace('b', 'c_+'))
    # print(content.find('b'))
    loc = content.find('b')
    if loc != -1:
        # print(content[0:loc] + 'c_+' + content[loc+len('b'):])
        ...
        lis_rep = list(content)
        print('#'.join(lis_rep))

    print('c' in content)

def test02():
    ...
    p1 = {'name':'zhangsan','age':21}
    p2 = dict(name = 'zhangsan',age=21)
    p3 = dict([('name','zhangsan'),['age', 21]])
    p4 = dict.fromkeys(['name','age'])
    print(p1)
    print(p2)
    print(p3)
    print(p4)


if __name__ == '__main__':
    pass
    test02()